/**
 * @author yusak
 */
Ext.app.InputEncoder = {
	encodeParams: function(record){
		var checkList = ['surface','reading','basetype_surface','part_of_speech','ctype','cform']
		var keyword = {}
		checkList.each(function(item){
			var data = record.get(item);
			if(data){
				keyword[item] = data.strip();
			}
		});
		return keyword;
	},
	getLocation: function(record){
		return record.get('interval');
	},
	getCenterWordIndex: function(records){
		var index = 0
		records.each(function(record,i){
			if(record.get('center_word')){
				index = i;
			}
		});
		return index;
	}
};
